.class public Lcom/netease/netstat/statistics/JsonGetTime;
.super Ljava/lang/Object;
.source "JsonGetTime.java"


# instance fields
.field private context:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 14
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 15
    iput-object p1, p0, Lcom/netease/netstat/statistics/JsonGetTime;->context:Landroid/content/Context;

    .line 16
    return-void
.end method


# virtual methods
.method public getJsonReponseTime()V
    .locals 13

    .prologue
    .line 24
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v11

    .line 27
    .local v11, starttime:J
    :try_start_0
    iget-object v0, p0, Lcom/netease/netstat/statistics/JsonGetTime;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/netease/util/HttpUtils;->getHttpClient(Landroid/content/Context;)Lorg/apache/http/client/HttpClient;

    move-result-object v0

    const-string v1, "http://c.3g.163.com/nc/article/headline/T1295501906343/0-20.html"

    const/4 v2, 0x0

    const/4 v3, 0x0

    .line 28
    const-string v4, "GET"

    const/4 v5, 0x0

    const-string v6, "utf-8"

    .line 26
    invoke-static/range {v0 .. v6}, Lcom/netease/util/HttpUtils;->getHttpStringResult(Lorg/apache/http/client/HttpClient;Ljava/lang/String;Ljava/util/List;[Lorg/apache/http/Header;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    .line 29
    .local v10, retText:Ljava/lang/String;
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    sub-long v7, v0, v11

    .line 30
    .local v7, duretime:J
    const-wide/16 v0, 0x0

    cmp-long v0, v7, v0

    if-ltz v0, :cond_0

    .line 31
    invoke-static {v7, v8}, Lcom/netease/netstat/utils/Contanst;->setJson(J)V

    .line 33
    :cond_0
    iget-object v0, p0, Lcom/netease/netstat/statistics/JsonGetTime;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/netease/util/HttpUtils;->getHttpClient(Landroid/content/Context;)Lorg/apache/http/client/HttpClient;

    move-result-object v0

    invoke-interface {v0}, Lorg/apache/http/client/HttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v0

    invoke-interface {v0}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 37
    .end local v7           #duretime:J
    .end local v10           #retText:Ljava/lang/String;
    :goto_0
    return-void

    .line 34
    :catch_0
    move-exception v9

    .line 35
    .local v9, e:Ljava/lang/Exception;
    invoke-virtual {v9}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method
